<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>embedme: IODevice类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">embedme
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.8 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li class="current"><a href="annotated.html"><span>类</span></a></li>
      <li><a href="files.html"><span>文件</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>类列表</span></a></li>
      <li><a href="classes.html"><span>类索引</span></a></li>
      <li><a href="hierarchy.html"><span>类继承关系</span></a></li>
      <li><a href="functions.html"><span>类成员</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pro-attribs">Protected 属性</a> &#124;
<a href="class_i_o_device-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">IODevice类 参考<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p>IO设备抽象类  
 <a href="class_i_o_device.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="_i_o_device_8h_source.html">IODevice.h</a>&gt;</code></p>
<div class="dynheader">
类 IODevice 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_i_o_device.png" usemap="#IODevice_map" alt=""/>
  <map id="IODevice_map" name="IODevice_map">
<area href="class_com_port.html" title="串口设备类. " alt="ComPort" shape="rect" coords="0,56,80,80"/>
<area href="class_file.html" title="文件类 " alt="File" shape="rect" coords="90,56,170,80"/>
<area href="class_mem_shared.html" title="共享内存类 " alt="MemShared" shape="rect" coords="180,56,260,80"/>
<area href="class_socket.html" title="Socket抽象基类 " alt="Socket" shape="rect" coords="270,56,350,80"/>
<area href="class_tcp_socket.html" title="TcpSocket类 " alt="TcpSocket" shape="rect" coords="225,112,305,136"/>
<area href="class_udp_socket.html" title="UdpSocket类 " alt="UdpSocket" shape="rect" coords="315,112,395,136"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a426aac91300f077d57b1f30c76c7c430"><td class="memItemLeft" align="right" valign="top">virtual sint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_device.html#a426aac91300f077d57b1f30c76c7c430">open</a> (const char *device=NULL, sint32 ioMode=IO_MODE_INVALID)</td></tr>
<tr class="memdesc:a426aac91300f077d57b1f30c76c7c430"><td class="mdescLeft">&#160;</td><td class="mdescRight">打开设备  <a href="#a426aac91300f077d57b1f30c76c7c430">更多...</a><br /></td></tr>
<tr class="separator:a426aac91300f077d57b1f30c76c7c430"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1120c9e7a7c4d0b23083effbe4cb6279"><td class="memItemLeft" align="right" valign="top">virtual sint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_device.html#a1120c9e7a7c4d0b23083effbe4cb6279">close</a> ()</td></tr>
<tr class="memdesc:a1120c9e7a7c4d0b23083effbe4cb6279"><td class="mdescLeft">&#160;</td><td class="mdescRight">关闭设备  <a href="#a1120c9e7a7c4d0b23083effbe4cb6279">更多...</a><br /></td></tr>
<tr class="separator:a1120c9e7a7c4d0b23083effbe4cb6279"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a79ebe9e2d1e2d1f685a8d40664cf6384"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a79ebe9e2d1e2d1f685a8d40664cf6384"></a>
virtual sint32&#160;</td><td class="memItemRight" valign="bottom"><b>readData</b> (char *buf, sint32 count, sint32 timeoutMs=-1)=0</td></tr>
<tr class="separator:a79ebe9e2d1e2d1f685a8d40664cf6384"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac04b13b59d0cd73bd2d60cef9145c0e9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac04b13b59d0cd73bd2d60cef9145c0e9"></a>
virtual sint32&#160;</td><td class="memItemRight" valign="bottom"><b>writeData</b> (const char *buf, sint32 count, sint32 timeoutMs=-1)=0</td></tr>
<tr class="separator:ac04b13b59d0cd73bd2d60cef9145c0e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aab385fd6e9610d5f972ab7c2154873d8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aab385fd6e9610d5f972ab7c2154873d8"></a>
virtual sint32&#160;</td><td class="memItemRight" valign="bottom"><b>setAttribute</b> (sint32 attr, sint32 value)=0</td></tr>
<tr class="separator:aab385fd6e9610d5f972ab7c2154873d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e5a79528498090542181a1147172f9e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0e5a79528498090542181a1147172f9e"></a>
virtual sint32&#160;</td><td class="memItemRight" valign="bottom"><b>getAttribute</b> (sint32 attr)=0</td></tr>
<tr class="separator:a0e5a79528498090542181a1147172f9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected 属性</h2></td></tr>
<tr class="memitem:a5ab8e2aa83ad8a53d8ddbb19b23d3688"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5ab8e2aa83ad8a53d8ddbb19b23d3688"></a>
sint32&#160;</td><td class="memItemRight" valign="bottom"><b>m_fd</b></td></tr>
<tr class="separator:a5ab8e2aa83ad8a53d8ddbb19b23d3688"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4900690afb4b4d17f90cfe3a9fb504e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa4900690afb4b4d17f90cfe3a9fb504e"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>m_devName</b></td></tr>
<tr class="separator:aa4900690afb4b4d17f90cfe3a9fb504e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5e930bf51c6a266e5be5b2ed62c7ecfa"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5e930bf51c6a266e5be5b2ed62c7ecfa"></a>
sint32&#160;</td><td class="memItemRight" valign="bottom"><b>m_openMode</b></td></tr>
<tr class="separator:a5e930bf51c6a266e5be5b2ed62c7ecfa"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>IO设备抽象类 </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a class="anchor" id="a1120c9e7a7c4d0b23083effbe4cb6279"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">sint32 IODevice::close </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>关闭设备 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">void</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>设备关闭成功返回STATUS_OK,失败返回STATUS_ERROR </dd></dl>
<dl class="section note"><dt>注解</dt><dd>none </dd></dl>

<p>被 <a class="el" href="class_tcp_socket.html#a58d2fff73fb69eb3f18b00aca7d6c87a">TcpSocket</a>, <a class="el" href="class_udp_socket.html#a579acf9700828b5e1c030b37475ec7ea">UdpSocket</a>, <a class="el" href="class_com_port.html#a75e33f87300daf62df4ae5bd21c0cbc4">ComPort</a>, <a class="el" href="class_socket.html#a1fe4c90416cad39e96049019d178fb37">Socket</a>, <a class="el" href="class_file.html#aabaf3655ddb4e02ea3e2cf5dcdae9391">File</a> , 以及 <a class="el" href="class_mem_shared.html#a62a6cdc1ea9b5507139139fce086e84d">MemShared</a> 重载.</p>

</div>
</div>
<a class="anchor" id="a426aac91300f077d57b1f30c76c7c430"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">sint32 IODevice::open </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>devName</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">sint32&#160;</td>
          <td class="paramname"><em>mode</em> = <code>IO_MODE_INVALID</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>打开设备 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">devName</td><td>设备全名(包含路径,如:/dev/ttyS0) </td></tr>
    <tr><td class="paramname">mode</td><td>打开模式IO_MODE_E </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>设备打开成功返回STATUS_OK,失败返回STATUS_ERROR </dd></dl>
<dl class="section note"><dt>注解</dt><dd>none </dd></dl>

<p>被 <a class="el" href="class_com_port.html#aae244aab39a2a0321016bc21c5164e24">ComPort</a>, <a class="el" href="class_socket.html#af9a5eeed90596d23629a4d7777696575">Socket</a>, <a class="el" href="class_file.html#a50677171d2d118707a394c6d8480fd14">File</a> , 以及 <a class="el" href="class_mem_shared.html#a39df58e72b12e412fb8474bf5d8173e5">MemShared</a> 重载.</p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>libemb/inc/<a class="el" href="_i_o_device_8h_source.html">IODevice.h</a></li>
<li>libemb/src/IODevice.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
生成于 2016年 七月 7日 星期四 19:49:38 , 为 embedme使用  &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.8
</small></address>
</body>
</html>
